{% extends "base.volt" %}

  {% block pageHeader %}
        {{ stylesheet_link("/libs/bootstrap-daterangepicker/daterangepicker.css", false) }}
  {% endblock %}

{% block pageFooter%}
        {{ javascript_include("/js/area.js", false) }}
    	{{ javascript_include("/libs/bootstrap-daterangepicker/moment.min.js", false) }}
    	{{ javascript_include("/libs/bootstrap-daterangepicker/daterangepicker.js", false) }}
        {{ javascript_include("/assets/manage/js/areaAdd.js", false) }}
        {{ javascript_include("/assets/manage/js/bp/bannerBpAdd.js", false) }}
{% endblock %}

{% block content %}
    {{ partial("module/left_bp") }}
    <div class="col-xs-10">
        <ol class="breadcrumb">
            <li>美容院</li>
            <li>首页美容院推荐</li>
            <li class="active">添加首页美容院推荐</li>
        </ol>

        <form id="form_add" class="form-horizontal" durl="{{ url.get('bp/bannerBp') }}" role="form" method="post" action="" target="ifr_send_file" enctype="multipart/form-data" >
            <input type="hidden" name="callback" value="parent.setFormResult">
            <div class="form-group">
                <label class="col-xs-2 control-label">美容院ID</label>
                <div class="col-xs-2">
                    <input type="text" class="form-control" value="{{ bp_id }}" id="bp_id" name="bp_id" data-rule="required;integer[+]">
                </div>
            </div>

            <div class="form-group">
                <label class="col-xs-2 control-label">推荐城市</label>
                <div class="col-xs-4">
                <div class="input-group">
                    <!--<label class="input-group-addon">省</label>
                    <select class="form-control" name="province" id="filterProvince" dvalue="{{ filterProvince|escape_attr }}">
                        <option value="">全部</option>
                    </select>-->
                    <label class="input-group-addon">市</label>
                    <select class="form-control" name="city" id="filterCity" dvalue="{{ filterCity|escape_attr }}">
                       {% if filterCity == 0 %}
                                <option value="0" {{ filterCity == 0 ? 'selected="selected"' : '' }} >请选择</option>
                                {% endif %}
                                {% for oc in openCity %}
                                    <option value="{{ oc.city_id }}" {{ filterCity == oc.city_id ? 'selected="selected"' : '' }} >{{ oc.city_name|e }}</option>
                                {% endfor %}
                    </select>
                </div>
                </div>
            </div>


            <div class="form-group">
                <label  class="col-xs-2 control-label">首页排序</label>
                <div class="col-xs-2">
                    <select class="form-control" id="sort" name="sort" >
						<option value="">未选择</option>
                        <option value="1">1</option>
                        <option value="2">2</option>
                        <option value="3">3</option>

                    </select>
                </div>
            </div>
            <!--新增首页推荐美容院图片-->
            <div class="form-group">
	            <label for="bp_cover" class="col-xs-2 control-label">首页图片</label>
	            <div class="col-xs-9">
	                <input type="file" class="form-control" id="bp_cover" name="bp_cover" data-rule="required;">
	                <p class="help-block">*支持JPG，PNG，JPEG格式的图片，大小不超过1M，尺寸为：750X350px</p>
	            </div>
        	</div>
            <div class="form-group">
	            <label for="bp_cover" class="col-xs-2 control-label">展示时间</label>
	            <div class="col-xs-9">
	                <input type="text" readonly class="form-control" id="time" name="time">
	            </div>
        	</div>
            

            <div class="form-group">
                 <div class="col-xs-offset-2 col-xs-10">
                     <button type="submit" class="btn btn-primary"><i class="fa fa-floppy-o fa-lg"></i> 保 存</button>
                  </div>
            </div>



        </form>
    </div>
{% endblock %}